﻿namespace WpfApp.Update
{

    public static class CurrentApplication
    {
#if RELEASE
        public const string AppName = "MatRec";
#else
        public const string AppName = "MatRec-Test";
#endif

        public const string Version = "2.0.5";

        public static event EventHandler<ApplicationMessageEventArgs>? NotifyApplicationMessage;

        public static void NotifyMessage(string message, ApplicationMessageTypes type = ApplicationMessageTypes.Info)
        {
            NotifyApplicationMessage?.Invoke(null, new ApplicationMessageEventArgs(message, type));
        }

        public static void NotifyInfo(string message)
        {
            NotifyApplicationMessage?.Invoke(null, new ApplicationMessageEventArgs(message, ApplicationMessageTypes.Info));
        }

        public static void NotifyError(string message)
        {
            NotifyApplicationMessage?.Invoke(null, new ApplicationMessageEventArgs(message, ApplicationMessageTypes.Error));
        }

        public static void NotifyWarning(string message)
        {
            NotifyApplicationMessage?.Invoke(null, new ApplicationMessageEventArgs(message, ApplicationMessageTypes.Warning));
        }
    }
}
